const mongoose = require("mongoose");

let userSchema = mongoose.Schema({
    username : {
        type : String,
        required : true
    },
    password: {
        type: String,
        required: true
    },
    createAt : {
        type : Date,
        default: Date.now()
    },
    atLoneliness:{ // 寂寞榜
        type:Boolean,
        default:true
    },
    tel:{
        type:String,
        required:true
    },
    headphoto:{
        type:String,
        default:"/static/headphoto/default.jpg"
    },
    description: String,
    email: String,
    idolId: [String],
    fansId: [String],
    diarybookId:[String],
    otherDiaryboolkId:[String],
    blacklist:[String]
})

let userModel = mongoose.model("user" , userSchema);

module.exports = userModel;